package com.ktgj.train.service;

import com.ktgj.train.domain.InterfaceEntity.*;
import com.ktgj.train.domain.TrainAccount;
import com.ktgj.train.domain.VerificationStatus;
import org.springframework.stereotype.Repository;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@Repository
public interface TrainService {

    //支付
    //TrOutTicketResponse OrderPayment(HttpServletRequest httpServletRequest, TrOutTicketRequest trOutTicketRequest, String callback);

    /**
     * 乘车人列表
     * @param httpServletRequest
     * @param trContactQueryRequest
     * @return
     */
    TrContactQueryResponse passengerList(HttpServletRequest httpServletRequest, TrContactQueryRequest trContactQueryRequest);

    /**
     * 增加和修改常用联系人
     * @param httpServletRequest
     * @param trAddAndUpdateContactsRequest
     * @return
     */
    TrAddAndUpdateContactsResponse addUpdatePassenger(HttpServletRequest httpServletRequest, TrAddAndUpdateContactsRequest trAddAndUpdateContactsRequest);

    /**
     * 付款链接
     * @param trainPaymentRequest
     * @return
     */
    Map<String, Object> pay(TrainPaymentRequest trainPaymentRequest);

    /**
     * 同步支付状态
     * @param request
     * @return
     */
    TrPayStatusSynchResponse payStatus(TrPayStatusSynchRequest request);

    /**
     * 找回密码（获取验证码）
     * @param request
     * @return
     */
    TrRetrievePasswordResponse retrievePassword(TrRetrievePasswordRequest request);

    /**
     * 找回密码（回填验证码）
     * @param token
     * @param request
     * @return
     */
    TrRetrievePasswordResponse sendcaptcharesult(String token, TrRetrievePasswordRequest request);

    /**
     * 重置密码（获取验证码）
     * @param request
     * @return
     */
    TrResetPasswordResponse resetPassword(TrResetPasswordRequest request);

    /**
     * 重置密码（发送验证码）
     * @param token
     * @param request
     * @return
     */
    TrResetPasswordResponse resetPasswordSend(String token, TrResetPasswordRequest request);

    /**
     * 注册12306账号
     * @param request
     * @return
     */
    TrRegisterAccountResponse registerAccount(TrRegisterAccountRequest request);

    /**
     * 短信验证
     * @param customerId
     * @param request
     * @return
     */
    TrPhoneMessageValidateResponse phoneMessageValidate(Long customerId, TrPhoneMessageValidateRequest request);

    /**
     * 查询会员12306账号
     * @param customerId
     * @return
     */
    TrainAccount queryAccountId(Long customerId);

    /**
     * 联系方式核验
     * @param status
     * @return
     */
    int verificationStatus(VerificationStatus status);
}
